Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zh-cn]: update the translation of Location hash property #24798

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

T34-active
Copy link
Contributor

@T34-active T34-active requested a review from a team as a code owner November 27, 2024 03:10
@T34-active T34-active requested review from JasonLamv-t and removed request for a team November 27, 2024 03:10
@github-actions github-actions bot added the l10n-zh Issues related to Chinese content. label Nov 27, 2024
Copy link
Contributor

github-actions bot commented Nov 27, 2024

Preview URLs

(comment last updated: 2025-01-08 01:15:18)

@JasonLamv-t JasonLamv-t enabled auto-merge (squash) November 27, 2024 14:51
@yin1999 yin1999 disabled auto-merge November 27, 2024 14:51
Comment on lines 21 to 25
<a id="myAnchor" href="/zh-CN/docs/Location.href#示例">示例</a>
<script>
var anchor = document.getElementById("myAnchor");
console.log(anchor.hash); // 返回'#Examples'
const anchor = document.getElementById("myAnchor");
console.log(anchor.hash); // '#示例'
</script>
Copy link
Member

@yin1999 yin1999 Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the example here appropriate?

The Location interface is accessible via Document.location and Window.location respectively.
--- from The Location interface

I don't think we should use an <a> element here, as <a> element is the implemetation of HTMLAnchorElement interface (not the Location interface).


Another issue on the content of this example. The hash property would be percent-encoded (see the test I made below), so the description above is also wrong 😢

It seems that only non-ascii characters will be encoded (details: mdn/content#37003)

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我先去修改上游

@T34-active T34-active marked this pull request as draft November 29, 2024 07:08
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added the merge conflicts 🚧 This pull request has merge conflicts that must be resolved. label Dec 13, 2024
@github-actions github-actions bot removed the merge conflicts 🚧 This pull request has merge conflicts that must be resolved. label Dec 13, 2024
@T34-active T34-active marked this pull request as ready for review December 20, 2024 03:19
@jasonren0403 jasonren0403 requested a review from yin1999 December 25, 2024 01:26
@yin1999 yin1999 marked this pull request as draft December 25, 2024 01:40
@yin1999
Copy link
Member

yin1999 commented Dec 25, 2024

上游的错误还未修复,我先转草稿了

@T34-active T34-active marked this pull request as ready for review January 8, 2025 01:13
@T34-active T34-active requested a review from JasonLamv-t January 8, 2025 01:13
@T34-active
Copy link
Contributor Author

@yin1999 可以了,上游已经更新了,请帮我审查

@yin1999
Copy link
Member

yin1999 commented Jan 10, 2025

@yin1999 可以了,上游已经更新了,请帮我审查

没有,我上面提到的问题其实还未解决,现在只是在示例层面隐藏了这个问题。我希望能够优先解决 该片段标识符没有进行{{Glossary("Percent-encoding", "百分号编码")}}。如果 URL 没有片段标识符,则此属性的值为空字符串 `""`。 这段话的问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-zh Issues related to Chinese content.
Projects
Status: Review requested
Development

Successfully merging this pull request may close these issues.

3 participants